package com.hzc.springchan.config.springioc;

import com.hzc.springchan.util.SpringUtils;
import com.tencentcloudapi.common.Credential;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author chen990627
 * @date 2022/10/14
 */
@Configuration
public class BeanLoadConfig {

    @Value("${custom.tencent-config.secret-id}")
    private String tencentSecretId;

    @Value("${custom.tencent-config.secret-key}")
    private String tencentSecretKey;

    @Bean
    public SpringUtils springUtils() {
        return new SpringUtils();
    }

    @Bean
    public Credential credential() {
        return new Credential(tencentSecretId, tencentSecretKey);
    }
}
